home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-02 | 8.9 KB | 220 lines | [TEXT/MPS ] |
- {
- layout routines.h -- Line Layout calls
-
- by Eric Mader and Dave Opstad,
- with special thanks to the following folks:
- • Mark Davis, for starting it all off;
- • Russ Sonnenschein, for many good ideas;
- • Cary Clark, Dave Good, Rob Johnson, Keith McGreggor, and Chris Yerga for the graphics system;
- • Richard Becker, Lynn Bekkala and Mike Reed for fonts and the gxFont system;
- • Robert Dierkes and the SQE team for testing and good ideas;
- • Parry Kejriwal and Richard Klein, for gxFont tools;
- • Diane Patterson, for great patience in writing documentation;
- • Hugo Ayala, Tom Dowdy, Dan Lipton, Sean Parent and the rest of the PrintShop;
- • Mitch Allen for managing to manage us; and
- • many other good folk at Apple!
-
- }
-
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT LayoutRoutines;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED UsingLayoutRoutines}
- {$SETC UsingLayoutRoutines := 1}
-
-
- { Copyright ©1998-1992 Apple Computer, Inc. All rights reserved. }
-
- {$I+}
- {$SETC LayoutRoutinesIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
- {$IFC UNDEFINED UsingGraphicsTypes}
- {$I $$Shell(PInterfaces)GraphicsTypes.p}
- {$ENDC}
- {$IFC UNDEFINED UsingMathTypes}
- {$I $$Shell(PInterfaces)MathTypes.p}
- {$ENDC}
- {$IFC UNDEFINED UsingLayoutTypes}
- {$I $$Shell(PInterfaces)LayoutTypes.p}
- {$ENDC}
- {$SETC UsingIncludes := LayoutRoutinesIncludes}
-
- FUNCTION GXNewLayout(textRunCount: LongInt;
- textRunLengths: IntegerArray;
- text: PtrArray;
- styleRunCount: LongInt;
- styleRunLengths: IntegerArray;
- styles: GxStyleArray;
- levelRunCount: LongInt;
- levelRunLengths, levels: IntegerArray;
- layoutOptions: GxLayoutOptionsPointer;
- position: GxPointPointer): GxShape; C;
-
- FUNCTION GXGetLayout(layout: GxShape;
- text: Ptr;
- VAR styleRunCount: LongInt;
- VAR styleRunLengths: Integer;
- VAR styles: GxStyle;
- VAR levelRunCount: LongInt;
- VAR levelRunLengths, levels: Integer;
- VAR layoutOptions: GxLayoutOptions;
- VAR position: GxPoint): LongInt; C;
-
- PROCEDURE GXSetLayout(layout: GxShape;
- textRunCount: LongInt;
- textRunLengths: IntegerArray;
- text: PtrArray;
- styleRunCount: LongInt;
- styleRunLengths: IntegerArray;
- styles: GxStyleArray;
- levelRunCount: LongInt;
- levelRunLengths, levels: IntegerArray;
- layoutOptions: GxLayoutOptionsPointer;
- position: GxPointPointer); C;
-
- PROCEDURE GXDrawLayout(textRunCount: LongInt;
- textRunLengths: IntegerArray;
- text: PtrArray;
- styleRunCount: LongInt;
- styleRunLengths: IntegerArray;
- styles: GxStyleArray;
- levelRunCount: LongInt;
- levelRunLengths, levels: IntegerArray;
- layoutOptions: GxLayoutOptionsPointer;
- position: GxPointPointer); C;
-
- PROCEDURE GXSetLayoutParts(layout: GxShape;
- oldStartOffset, oldEndOffset: GxByteOffset;
- newTextRunCount: LongInt;
- newTextRunLengths: IntegerArray;
- newText: PtrArray;
- newStyleRunCount: LongInt;
- newStyleRunLengths: IntegerArray;
- newStyles: GxStyleArray;
- newLevelRunCount: LongInt;
- newLevelRunLengths, newLevels: IntegerArray); C;
-
- PROCEDURE GXSetLayoutShapeParts(layout: GxShape; startOffset, endOffset: GxByteOffset; insert: GxShape); C;
-
- FUNCTION GXGetLayoutParts(layout: GxShape;
- startOffset, endOffset: GxByteOffset;
- text: Ptr;
- VAR styleRunCount: LongInt;
- VAR styleRunLengths: Integer;
- VAR styles: GxStyle;
- VAR levelRunCount: LongInt;
- VAR levelRunLengths, levels: Integer): LongInt; C;
-
- FUNCTION GXGetLayoutShapeParts(layout: GxShape; startOffset, endOffset: GxByteOffset; dest: GxShape): GxShape; C;
-
- FUNCTION GXGetLayoutGlyphs(layout: GxShape;
- VAR glyphs: GxGlyphcode;
- VAR positions: GxPoint;
- VAR advance: LongInt;
- VAR tangents: GxPoint;
- VAR runCount: LongInt;
- VAR styleRuns: Integer;
- VAR glyphStyles: GxStyle): LongInt; C;
-
- FUNCTION GXHitTestLayout(layout: GxShape;
- hitDown: GxPointPointer;
- highlightType: GxHighlightType;
- VAR hitInfo: GxLayoutHitInfo;
- hitTrackingArea: GxShape): GxByteOffset; C;
-
- FUNCTION GXGetLayoutHighlight(layout: GxShape; startOffset, endOffset: GxByteOffset; highlightType: GxHighlightType; highlight: GxShape): GxShape; C;
-
- FUNCTION GXGetLayoutVisualHighlight(layout: GxShape;
- startOffset: GxByteOffset;
- startLeadingEdge: LongInt;
- endOffset: GxByteOffset;
- endLeadingEdge: LongInt;
- highlightType: GxHighlightType;
- highlight: GxShape): GxShape; C;
-
- FUNCTION GXGetLayoutCaret(layout: GxShape; offset: GxByteOffset; highlightType: GxHighlightType; caretType: GxCaretType; caret: GxShape): GxShape; C;
-
- FUNCTION GXGetLayoutBreakOffset(layout: GxShape;
- startOffset: GxByteOffset;
- lineWidth: Fixed;
- hyphenationCount: LongInt;
- hyphenationPoints: GxByteOffsetArray;
- VAR startIsStaked: Boolean;
- VAR priorStake, nextStake: GxByteOffset): GxByteOffset; C;
-
- FUNCTION GXGetLayoutRangeWidth(layout: GxShape; startOffset, endOffset: GxByteOffset; supplementaryText: GxShape): Fixed; C;
-
- FUNCTION GXNewLayoutFromRange(layout: GxShape;
- startOffset, endOffset: GxByteOffset;
- layoutOptions: GxLayoutOptionsPointer;
- supplementaryText: GxShape): GxShape; C;
-
- FUNCTION GXGetCaretAngleArea(layout: GxShape;
- hitPoint: GxPointPointer;
- highlightType: GxHighlightType;
- caretArea: GxShape;
- VAR returnedRise, returnedRun: Integer): GxShape; C;
-
- PROCEDURE GXGetStyleBaselineDeltas(baseStyle: GxStyle; baseType: GxBaselineType; returnedDeltas: GxBaselineDeltas); C;
-
- FUNCTION GXGetRightVisualOffset(layout: GxShape; currentOffset: GxByteOffset): GxByteOffset; C;
- FUNCTION GXGetLeftVisualOffset(layout: GxShape; currentOffset: GxByteOffset): GxByteOffset; C;
-
- PROCEDURE GXGetCompoundCharacterLimits(layout: GxShape; trial: GxByteOffset; VAR minOffset, maxOffset: GxByteOffset; VAR onBoundary: Boolean); C;
-
- PROCEDURE GXGetOffsetGlyphs(layout: GxShape;
- trial: GxByteOffset;
- leadingEdge: LongInt;
- VAR offsetState: GxLayoutOffsetState;
- VAR firstGlyph, secondGlyph: UnsignedLongint); C;
-
- PROCEDURE GXGetGlyphOffsets(layout: GxShape;
- trial: GxByteOffset;
- onLeftTop: LongInt;
- VAR offset: GxByteOffset;
- VAR leadingEdge, wasRealCharacter: Boolean); C;
-
- PROCEDURE GXGetLayoutSpan(layout: GxShape; VAR lineAscent, lineDescent: Fixed); C;
- PROCEDURE GXSetLayoutSpan(layout: GxShape; lineAscent, lineDescent: Fixed); C;
-
- PROCEDURE GXSetStyleRunControls(target: GxStyle; runControls: GxRunControlsPointer); C;
- PROCEDURE GXSetStyleRunPriorityJustOverride(target: GxStyle; priorityJustificationOverride: GxPriorityJustificationOverridePointer); C;
- PROCEDURE GXSetStyleRunGlyphJustOverrides(target: GxStyle; count: LongInt; glyphJustificationOverrides: GxGlyphJustificationOverrideArray); C;
- PROCEDURE GXSetStyleRunGlyphSubstitutions(target: GxStyle; count: LongInt; glyphSubstitutions: GxGlyphSubstitutionArray); C;
- PROCEDURE GXSetStyleRunFeatures(target: GxStyle; count: LongInt; runFeatures: GxRunFeatureArray); C;
- PROCEDURE GXSetStyleRunKerningAdjustments(target: GxStyle; count: LongInt; kerningAdjustments: GxKerningAdjustmentArray); C;
-
- PROCEDURE GXSetShapeRunControls(target: GxShape; runControls: GxRunControlsPointer); C;
- PROCEDURE GXSetShapeRunPriorityJustOverride(target: GxShape; priorityJustificationOverride: GxPriorityJustificationOverridePointer); C;
- PROCEDURE GXSetShapeRunGlyphJustOverrides(target: GxShape; count: LongInt; glyphJustificationOverrides: GxGlyphJustificationOverrideArray); C;
- PROCEDURE GXSetShapeRunGlyphSubstitutions(target: GxShape; count: LongInt; glyphSubstitutions: GxGlyphSubstitutionArray); C;
- PROCEDURE GXSetShapeRunFeatures(target: GxShape; count: LongInt; runFeatures: GxRunFeatureArray); C;
- PROCEDURE GXSetShapeRunKerningAdjustments(target: GxShape; count: LongInt; kerningAdjustments: GxKerningAdjustmentArray); C;
-
- FUNCTION GXGetStyleRunControls(source: GxStyle; VAR runControls: GxRunControls): LongInt; C;
- FUNCTION GXGetStyleRunPriorityJustOverride(source: GxStyle; VAR priorityJustificationOverride: GxPriorityJustificationOverride): LongInt; C;
- FUNCTION GXGetStyleRunGlyphJustOverrides(source: GxStyle; VAR glyphJustificationOverrides: GxGlyphJustificationOverride): LongInt; C;
- FUNCTION GXGetStyleRunGlyphSubstitutions(source: GxStyle; VAR glyphSubstitutions: GxGlyphSubstitution): LongInt; C;
- FUNCTION GXGetStyleRunFeatures(source: GxStyle; VAR runFeatures: GxRunFeature): LongInt; C;
- FUNCTION GXGetStyleRunKerningAdjustments(source: GxStyle; VAR kerningAdjustments: GxKerningAdjustment): LongInt; C;
-
- FUNCTION GXGetShapeRunControls(source: GxShape; VAR runControls: GxRunControls): LongInt; C;
- FUNCTION GXGetShapeRunPriorityJustOverride(source: GxShape; VAR priorityJustificationOverride: GxPriorityJustificationOverride): LongInt; C;
- FUNCTION GXGetShapeRunGlyphJustOverrides(source: GxShape; VAR glyphJustificationOverrides: GxGlyphJustificationOverride): LongInt; C;
- FUNCTION GXGetShapeRunGlyphSubstitutions(source: GxShape; VAR glyphSubstitutions: GxGlyphSubstitution): LongInt; C;
- FUNCTION GXGetShapeRunFeatures(source: GxShape; VAR runFeatures: GxRunFeature): LongInt; C;
- FUNCTION GXGetShapeRunKerningAdjustments(source: GxShape; VAR kerningAdjustments: GxKerningAdjustment): LongInt; C;
-
-
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-